# Date： 2023/2/24 10:16

# 读取
file=open('a.txt', 'r', encoding='utf-8')
print(file.readlines())
file.close()

# 写-覆盖
file2=open('b.txt', 'w')
file2.write("hello world; \nhello python")
file2.close()


# 追加
file3=open('b.txt', 'a')
file3.write("\nhello")
file3.close()


# 跳过两个字节
file4=open('a.txt', 'r', encoding='utf-8')
file4.seek(3)
print(file4.tell())
print(file4.readlines())
print(file4.read())
file4.close()


